from django.contrib import admin
from modelBot.models import DingBots, Scenes, Timers


# Register your models here.
class BotsAdmin(admin.ModelAdmin):
    list_display = ('name', 'to_group', 'access_token', 'is_active', 'create_at', 'modify_at', 'creator')
    # fields = ('name', 'to_group', 'access_token', 'is_active', 'create_at', 'modify_at')


class TimersInline(admin.StackedInline):
    model = Timers
    extra = 1


class ScenesAdmin(admin.ModelAdmin):
    inlines = [TimersInline]


admin.site.register(DingBots, BotsAdmin)
admin.site.register(Scenes, ScenesAdmin)
# admin.site.register(Timers)
